﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace FUSE
{
    public class Circle
    {
        public Vector2 centerPOS;
        public float radius;

        public Circle()
        {
            centerPOS = Vector2.Zero;
            radius = 0.0f;
        }

        public Circle(Vector2 newCenterPOS, float newRadius)
        {
            centerPOS.X = newCenterPOS.X;
            centerPOS.Y = newCenterPOS.Y;
            radius = newRadius;
        }

        public void SetPosition(Vector2 newCenterPOS)
        {
            centerPOS.X = newCenterPOS.X;
            centerPOS.Y = newCenterPOS.Y;
        }

        public Boolean Intersects(Circle otherCircle)
        {
            float distance = (float) Math.Sqrt(Math.Pow((centerPOS.X - otherCircle.centerPOS.X),2) + 
                Math.Pow((centerPOS.Y - otherCircle.centerPOS.Y),2));
            if (distance <= (this.radius + otherCircle.radius))
                return true;
            return false;
        }
    }
}
